<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TrabalhodeSistemasOperacionais: Referência da Classe ControladorDeRecursos</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Gerado por Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">TrabalhodeSistemasOperacionais&#160;<span id="projectnumber">1.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Página&#160;Principal</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Arquivos</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Lista&#160;de&#160;Componentes</span></a></li>
      <li><a href="classes.html"><span>Índice&#160;dos&#160;Componentes</span></a></li>
      <li><a href="functions.html"><span>Componentes&#160;Membros</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Métodos Públicos</a> &#124;
<a href="#pub-attribs">Atributos Públicos</a>  </div>
  <div class="headertitle">
<h1>Referência da Classe ControladorDeRecursos</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="ControladorDeRecursos" -->
<p><code>#include &lt;<a class="el" href="controladorderecursos_8h_source.html">controladorderecursos.h</a>&gt;</code></p>

<p><a href="classControladorDeRecursos-members.html">Lista de todos os Membros.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Métodos Públicos</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#a8d76930b4d8cd4e16bba71e500528318">ControladorDeRecursos</a> (QObject *parent=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#abe41b51f7e7fa5e1b4b36d23c5609842">alocarRecursos</a> (int agenciaAlfa, int agenciaBeta)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#af3373e5211cc5b0a50e9f028ca9f4feb">liberarRecursos</a> (int agenciaAlfa, int agenciaBeta)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#a11d70028f7a1d6b3322d3598431421c0">~ControladorDeRecursos</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#a46995e6cecb18a8f99e439fb48b89365">localizaCliente</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Atributos Públicos</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMutex&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#a07694a5a06d3c8759deea101e9a08351">mutexAlocarRecursos</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMutex&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#a8cc0863c9b846edbbe342630bc2a0370">mutexFilaPrioritaria</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMutex&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#a5b861cd49370779a335561291264b880">mutexFila</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMutex&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#a1d032beae44e9cb096fd7f1976c8d99b">vetorMutexLog</a> [4]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMutex&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#a7eac37c798d3c35f37db85ec6bca09ea">vetorMutexClientes</a> [4]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QTextStream *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#a32c0509169515d3e5d3deb362a9b1bb6">logDeOperacao</a> [4]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QTextStream *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#aee6d928b22bdedd746a17432f4359336">streamClientes</a> [4]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QFile *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#a65293a2608bc1e50c215d628deb18a98">vetorFileLogDeOperacao</a> [4]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QFile *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#a51febea7f8427f4dcd7fd8e698a208fa">vetorFileClientes</a> [4]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classControladorDeRecursos.html#afcaacc18523b061e93a0176d45858a4c">vetorRecursos</a> [4]</td></tr>
</table>
<hr/><a name="_details"></a><h2>Descrição Detalhada</h2>
<div class="textblock"><p>classe que abriga todos os mecanismos de controle de recursos utilizados </p>
</div><hr/><h2>Construtores &amp; Destrutores</h2>
<a class="anchor" id="a8d76930b4d8cd4e16bba71e500528318"></a><!-- doxytag: member="ControladorDeRecursos::ControladorDeRecursos" ref="a8d76930b4d8cd4e16bba71e500528318" args="(QObject *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ControladorDeRecursos::ControladorDeRecursos </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>0</code></td><td>)</td>
          <td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a11d70028f7a1d6b3322d3598431421c0"></a><!-- doxytag: member="ControladorDeRecursos::~ControladorDeRecursos" ref="a11d70028f7a1d6b3322d3598431421c0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ControladorDeRecursos::~ControladorDeRecursos </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Métodos</h2>
<a class="anchor" id="abe41b51f7e7fa5e1b4b36d23c5609842"></a><!-- doxytag: member="ControladorDeRecursos::alocarRecursos" ref="abe41b51f7e7fa5e1b4b36d23c5609842" args="(int agenciaAlfa, int agenciaBeta)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ControladorDeRecursos::alocarRecursos </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>agenciaAlfa</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>agenciaBeta</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>retorna true , se conseguir alocar os recursos, e false se não conseguir </p>

</div>
</div>
<a class="anchor" id="af3373e5211cc5b0a50e9f028ca9f4feb"></a><!-- doxytag: member="ControladorDeRecursos::liberarRecursos" ref="af3373e5211cc5b0a50e9f028ca9f4feb" args="(int agenciaAlfa, int agenciaBeta)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ControladorDeRecursos::liberarRecursos </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>agenciaAlfa</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>agenciaBeta</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>libera os recursos e sinaliza se hoube uscesso </p>

</div>
</div>
<a class="anchor" id="a46995e6cecb18a8f99e439fb48b89365"></a><!-- doxytag: member="ControladorDeRecursos::localizaCliente" ref="a46995e6cecb18a8f99e439fb48b89365" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ControladorDeRecursos::localizaCliente </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Funcao para localizar a entrada de um cliente no banco de dados </p>

</div>
</div>
<hr/><h2>Atributos</h2>
<a class="anchor" id="a32c0509169515d3e5d3deb362a9b1bb6"></a><!-- doxytag: member="ControladorDeRecursos::logDeOperacao" ref="a32c0509169515d3e5d3deb362a9b1bb6" args="[4]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QTextStream* <a class="el" href="classControladorDeRecursos.html#a32c0509169515d3e5d3deb362a9b1bb6">ControladorDeRecursos::logDeOperacao</a>[4]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Ponteiro para QDataStream de log de operacoes realizadas. </p>

</div>
</div>
<a class="anchor" id="a07694a5a06d3c8759deea101e9a08351"></a><!-- doxytag: member="ControladorDeRecursos::mutexAlocarRecursos" ref="a07694a5a06d3c8759deea101e9a08351" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QMutex <a class="el" href="classControladorDeRecursos.html#a07694a5a06d3c8759deea101e9a08351">ControladorDeRecursos::mutexAlocarRecursos</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Mutex para alocar recursos </p>

</div>
</div>
<a class="anchor" id="a5b861cd49370779a335561291264b880"></a><!-- doxytag: member="ControladorDeRecursos::mutexFila" ref="a5b861cd49370779a335561291264b880" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QMutex <a class="el" href="classControladorDeRecursos.html#a5b861cd49370779a335561291264b880">ControladorDeRecursos::mutexFila</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a8cc0863c9b846edbbe342630bc2a0370"></a><!-- doxytag: member="ControladorDeRecursos::mutexFilaPrioritaria" ref="a8cc0863c9b846edbbe342630bc2a0370" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QMutex <a class="el" href="classControladorDeRecursos.html#a8cc0863c9b846edbbe342630bc2a0370">ControladorDeRecursos::mutexFilaPrioritaria</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aee6d928b22bdedd746a17432f4359336"></a><!-- doxytag: member="ControladorDeRecursos::streamClientes" ref="aee6d928b22bdedd746a17432f4359336" args="[4]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QTextStream* <a class="el" href="classControladorDeRecursos.html#aee6d928b22bdedd746a17432f4359336">ControladorDeRecursos::streamClientes</a>[4]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Ponteiro para QDataStream de dados dos clientes. </p>

</div>
</div>
<a class="anchor" id="a51febea7f8427f4dcd7fd8e698a208fa"></a><!-- doxytag: member="ControladorDeRecursos::vetorFileClientes" ref="a51febea7f8427f4dcd7fd8e698a208fa" args="[4]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QFile* <a class="el" href="classControladorDeRecursos.html#a51febea7f8427f4dcd7fd8e698a208fa">ControladorDeRecursos::vetorFileClientes</a>[4]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Ponteiro para QFile de dados dos clientes. </p>

</div>
</div>
<a class="anchor" id="a65293a2608bc1e50c215d628deb18a98"></a><!-- doxytag: member="ControladorDeRecursos::vetorFileLogDeOperacao" ref="a65293a2608bc1e50c215d628deb18a98" args="[4]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QFile* <a class="el" href="classControladorDeRecursos.html#a65293a2608bc1e50c215d628deb18a98">ControladorDeRecursos::vetorFileLogDeOperacao</a>[4]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Ponteiro para QFile de log de operacoes realizadas. </p>

</div>
</div>
<a class="anchor" id="a7eac37c798d3c35f37db85ec6bca09ea"></a><!-- doxytag: member="ControladorDeRecursos::vetorMutexClientes" ref="a7eac37c798d3c35f37db85ec6bca09ea" args="[4]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QMutex <a class="el" href="classControladorDeRecursos.html#a7eac37c798d3c35f37db85ec6bca09ea">ControladorDeRecursos::vetorMutexClientes</a>[4]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Mutex para alocar os arquivos de clientes </p>

</div>
</div>
<a class="anchor" id="a1d032beae44e9cb096fd7f1976c8d99b"></a><!-- doxytag: member="ControladorDeRecursos::vetorMutexLog" ref="a1d032beae44e9cb096fd7f1976c8d99b" args="[4]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QMutex <a class="el" href="classControladorDeRecursos.html#a1d032beae44e9cb096fd7f1976c8d99b">ControladorDeRecursos::vetorMutexLog</a>[4]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Mutex para alocar os logs </p>

</div>
</div>
<a class="anchor" id="afcaacc18523b061e93a0176d45858a4c"></a><!-- doxytag: member="ControladorDeRecursos::vetorRecursos" ref="afcaacc18523b061e93a0176d45858a4c" args="[4]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classControladorDeRecursos.html#afcaacc18523b061e93a0176d45858a4c">ControladorDeRecursos::vetorRecursos</a>[4]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Vetor de disponibilidade de recursos. Cada recurso representa a possibilidade de pegar lock do log de clientes da agencia. Inicializa com todos os recursos disponiveis. </p>

</div>
</div>
<hr/>A documentação para esta classe foi gerada a partir dos seguintes arquivos:<ul>
<li><a class="el" href="controladorderecursos_8h_source.html">controladorderecursos.h</a></li>
<li><a class="el" href="controladorderecursos_8cpp.html">controladorderecursos.cpp</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Gerado em Terça, 6 de Dezembro de 2011 01:44:55 para TrabalhodeSistemasOperacionais por&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
